package com.yanqu.road.logic.bussiness.relatives;

import com.yanqu.road.entity.relatives.RelativesGift;
import com.yanqu.road.entity.relatives.RelativesInfo;
import com.yanqu.road.entity.relatives.RelativesLetter;
import com.yanqu.road.logic.bussiness.DaoHelper;

import java.util.List;
import java.util.Map;

public class RelativesBussiness {

	public static List<RelativesInfo> getRelativesInfoList(long userId) {
		return DaoHelper.getRelativesDaoImpl().getRelativesInfoList(userId);
	}

	public static Map<Long, RelativesInfo> getRelativesInfoMap(long userId) {
		return DaoHelper.getRelativesDaoImpl().getRelativesInfoMap(userId);
	}
	public static Long getMaxGiftId() {
		return DaoHelper.getRelativesGiftDaoImpl().getMaxGiftId();
	}

	public static Long getMaxLetterId() {
		return DaoHelper.getRelativesLetterDaoImpl().getMaxLetterId();
	}

	public static Map<Long, List<RelativesLetter>> getRelativesLetter(long userId) {
		return DaoHelper.getRelativesLetterDaoImpl().getRelativesLetter(userId);
	}
	public static List<RelativesLetter> getRelativesLetterList(long userId) {
		return DaoHelper.getRelativesLetterDaoImpl().getRelativesLetterList(userId);
	}

	public static boolean seeLetter(long letterId) {
		return DaoHelper.getRelativesLetterDaoImpl().seeLetter(letterId);
	}

	public static Map<Long, RelativesGift> getRelativesGift(long userId, boolean isFrom) {
		return DaoHelper.getRelativesGiftDaoImpl().getRelativesGift(userId, isFrom);
	}

	public static List<RelativesGift> getRelativesGiftList(long userId) {
		return DaoHelper.getRelativesGiftDaoImpl().getRelativesGiftList(userId);
	}

	public static List<RelativesGift> getRelativesGiftList(List<Long> userIdList) {
		return DaoHelper.getRelativesGiftDaoImpl().getRelativesGiftList(userIdList);
	}

	public static int getDayGiveOrReceiveGiftNum(long userId, boolean isFrom) {
		return DaoHelper.getRelativesGiftDaoImpl().getDayGiveOrReceiveGiftNum(userId, isFrom);
	}

	public static boolean addRelativesInfo(RelativesInfo relativesInfo) {
		return DaoHelper.getRelativesDaoImpl().add(relativesInfo);
	}

	public static boolean updateRelativesInfo(RelativesInfo relativesInfo) {
		return DaoHelper.getRelativesDaoImpl().update(relativesInfo);
	}
	public static boolean addRelativesGift(RelativesGift relativesGift) {
		return DaoHelper.getRelativesGiftDaoImpl().add(relativesGift);
	}

	public static boolean updateRelativesGift(RelativesGift relativesGift) {
		return DaoHelper.getRelativesGiftDaoImpl().update(relativesGift);
	}
	public static boolean addRelativesLetter(RelativesLetter relativesLetter) {
		return DaoHelper.getRelativesLetterDaoImpl().add(relativesLetter);
	}

	public static boolean updateRelativesLetter(RelativesLetter relativesLetter) {
		return DaoHelper.getRelativesLetterDaoImpl().update(relativesLetter);
	}
}
